{% load static %}
{#{% load admin_customer_tags %}#}

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">修改菜单</h4>
</div>
<div class="modal-body">
    <form class="form-horizontal" id="update-menu">
        {% csrf_token %}
        <div class="box-body">
            {% for field in form %}
                {% if field.name == 'is_visible' %}
                    <div class="form-group">

                        <div class="col-sm-offset-2 col-sm-10">

                            <div class="checkbox">
                                <label for="{{ field.id_for_label }}">{{ field }}{{ field.label }}</label>
                            </div>
                        </div>

                    </div>
                {% else %}
                    <div class="form-group {% if field.errors %}has-error{% endif %}">

                        <label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>

                        <div class="col-sm-10">
                            {% for error in field.errors %}
                                <label class="control-label" for="{{ field.id_for_label }}">{{ error }}</label>
                            {% endfor %}
                            {{field}}
                        </div>
                    </div>
                {% endif %}
            {% endfor %}

        </div>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
    <button type="button" class="btn btn-primary update">修改</button>
</div>

<script src="{% static 'js/myadmin/update_menu.js' %}"></script>
